﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace Arroguella.Entities
{
    /// <summary>
    /// An entity that is INTENDED to be equipped by the player in some fashion.
    /// </summary>
    public class EquipmentEntity : Entity
    {
        #region Constructor

        public EquipmentEntity(string name, char symbol, Color color, List<string> slotsEquippable, string description, float weight) : base(name, symbol, color)
        {
            SlotsEquippable = slotsEquippable;
            Description = description;
            Weight = weight;
        }

        public EquipmentEntity(string name, char symbol, Color color, List<string> slotsEquippable, int minDamage, int maxDamage, int accuracyMod, int damageMod, int defenseMod, string description, float weight)
            : base(name, symbol, color)
        {
            SlotsEquippable = slotsEquippable;
            Description = description;
            Weight = weight;

            MinDamage = minDamage;
            MaxDamage = maxDamage;
            AccuracyModifier = accuracyMod;
            DamageModifier = damageMod;
            DefenseModifier = defenseMod;
        }

        #endregion

        #region Properties

        /// <summary>
        /// The slots to which this entity can be equipped, in order of preference.
        /// For instance, "Main Hand, Off Hand" would mean this entity would try to equip
        /// in the Main Hand slot first, but if that's not available, it would
        /// try to equip in the Off Hand slot.
        /// </summary>
        public List<string> SlotsEquippable;

        /// <summary>
        /// The min and max damage values (inclusive) limit the amount of base damage this entity can do.
        /// For instance, if min was 2 and max was 8, this would be equivalent to saying 2d4 damage.
        /// These do not take into account any modifiers.
        /// </summary>
        public int MinDamage;

        /// <summary>
        /// The min and max damage values (inclusive) limit the amount of base damage this entity can do.
        /// For instance, if min was 2 and max was 8, this would be equivalent to saying 2d4 damage.
        /// These do not take into account any modifiers.
        /// </summary>
        public int MaxDamage;

        /// <summary>
        /// Modification to the player's overall accuracy when this entity is equipped during battle.
        /// </summary>
        public int AccuracyModifier;

        /// <summary>
        /// After generating a random value between min and max damage, we apply this modifier.
        /// </summary>
        public int DamageModifier;

        /// <summary>
        /// Modification to the player's overall defense when this entity is equipped during battle.
        /// </summary>
        public int DefenseModifier;

        #endregion
    }
}
